import QtQuick 2.0
import QtQuick.Window 2.12
Window{

    id: root
    readonly property real dp: config.dp
    property var box_text: ""

    function setText(text){
        box_text = text
    }

    minimumHeight: 250*dp
    maximumHeight: 250*dp
    minimumWidth: 400*dp
    maximumWidth: 400*dp
    title: "提示"
    modality: Qt.WindowModal
    flags: Qt.Window | Qt.WindowTitleHint |Qt.WindowSystemMenuHint | Qt.WindowCloseButtonHint


    Image {
        x: 175*dp
        y: 30*dp
        id: name
        height: 50*dp
        width: 50*dp
        source: "qrc:/picture/msgError.png"
    }

    Text{
        height: 100*dp
        lineHeight: 1.3
        font.pixelSize: config.fontsize
        horizontalAlignment: TextInput.AlignHCenter
        wrapMode: Text.WordWrap
        width: parent.width-100*dp
        x: 50*dp
        y: 90*dp
        text: "提示"
    }

    Text {
        id: msgText
        height: 100*dp
        lineHeight: 1.3
        font.pixelSize: config.fontsize
        horizontalAlignment: TextInput.AlignHCenter
        wrapMode: Text.WordWrap
        width: parent.width-100*dp
        x: 50*dp
        y: 115*dp
        font.bold: true
        color: "#999999"
        text: box_text
    }

    PushButton{
        x: 140*dp
        y: 170*dp
        defaultMode2: true
        title: "确认"
        onReleased: {
            root.hide()
        }
    }
}
